package com.jackstraw.jack_base.datasource.database.parten.entity.bean;


import com.jackstraw.jack_base.datasource.common.entity.AbstractTemplate;
import com.jackstraw.jack_base.datasource.database.parten.entity.DataBaseEntity;
import lombok.Data;

import javax.sql.DataSource;


/**
 * 数据库服务类
 */
@Data
public class DataBaseTemplate<DBE extends DataBaseEntity<DBE>>
        extends AbstractTemplate<DataBaseTemplate<DBE>, DataBasePropertiesEntity<DBE>> {


    /**
     * 数据源工具类
     */
    private DataBaseRoutingDataSource dataBaseRoutingDataSource;


    /**
     * 拿到数据源
     *
     * @return
     */
    @Override
    public DataSource get() {
       return dataBaseRoutingDataSource.get();
    }

}
